<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>【Example Jsp】</title>
<link rel="StyleSheet" href="common/dtree/dtree.css" type="text/css" />
<script type="text/javascript" src="common/jquery/jquery-1.5.1.js"></script>
<script type="text/javascript" src="common/dtree/dtree.js"></script>
<script type="text/javascript">
//$.ajaxSetup({async: false});
$(document).ready(function(){jQuery.getJSON("Example/exampleAction.action",{id:100,name:"haha"},function Callback(data){createTree(data);},"json");});
d = new dTree('d');
function createTree(data){
	data=eval(data);
	d.add(0,-1,'Example Menutree');
	$.each(data,function(i,info){
		d.add(i+1,i,info.varname,info.varurl,info.varname,"t4");
		});	
	$("#treeinfo").append(d.toString());
}
</script>
</head>
<body>
<div id="treeinfo" class="dtree">
<p><a href="javascript: d.openAll();">open all</a> | <a href="javascript: d.closeAll();">close all</a></p>
</div>
</body>
</html>